package com.my.zidingyikongjian.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;

import com.my.zidingyikongjian.R;
import com.my.zidingyikongjian.view.three.MySetView;

public class DrawRegionActivity extends AppCompatActivity {
    private FrameLayout frameLayout;
    private String flag;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_draw_region);
        Intent dataIntent = getIntent();
        flag = dataIntent.getStringExtra("three");

        initView();
    }

    private void initView() {
        frameLayout = findViewById(R.id.fl_three);
        if (flag.equals("1")) {
            frameLayout.addView(new MySetView(this, 1));
        } else if (flag.equals("2")) {
            frameLayout.addView(new MySetView(this, 2));
        } else if (flag.equals("3")) { // 交集
            frameLayout.addView(new MySetView(this, 3));
        } else if (flag.equals("4")) { // canvas translate
            frameLayout.addView(new MySetView(this, 4));
        }
    }
}
